cmake_minimum_required(VERSION 3.20.0)
project(TokenColorize CXX)
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
set(SIMPLEINI_DIR "" CACHE PATH "simpleini dep")
set(ABSL_DIR "" CACHE PATH "absl dep")


add_library(TokenColorize 
            linebuffer.cpp  
            #qttelnet.cpp
            TokenColors.cpp  
            tokenparser.cpp  
            tokenrender.cpp  
            tokensettings.cpp
)

target_include_directories(TokenColorize PUBLIC ${SIMPLEINI_DIR}/include     ${ABSL_DIR}/include)
target_link_directories(TokenColorize PUBLIC ${SIMPLEINI_DIR}/lib ${ABSL_DIR}/lib)
target_link_libraries(TokenColorize PUBLIC simpleini absl)

if(WIN32)
#set_target_properties (TokenColorize PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${DESTDIR})
endif()
FILE(GLOB INCS ./*.h)
install(TARGETS TokenColorize TokenColorize LIBRARY DESTINATION "${INSTALL_LIB_DIR}" )
install(FILES ${INCS} DESTINATION "${INSTALL_INC_DIR}")